package com.wish.contract.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wish.common.core.web.domain.AjaxResult;
import com.wish.contract.entity.CfTermination;
import com.wish.contract.entity.CfTerminationDto;
import com.wish.contract.entity.CfTerminationSearchPage;
import com.wish.contract.service.ICfTerminationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 崔-收房解约协议查询 前端控制器
 * </p>
 *
 * @author xioacui
 * @since 2022-03-26
 */
@RestController
@RequestMapping("/contract/cf-termination")
public class CfTerminationController {

    @Autowired
    private ICfTerminationService iCfTerminationService;

    /*
    *  收房协议查询列表
    * */
    @GetMapping(value = "/list")
    public AjaxResult cfTerminationDtoList(CfTerminationSearchPage cfTerminationSearchPage) {
        IPage<CfTerminationDto> page = new Page<>(cfTerminationSearchPage.getPageNum(), cfTerminationSearchPage.getPageSize());
        page = iCfTerminationService.searchCfTerminationList(page, cfTerminationSearchPage);
        return AjaxResult.success(page);
    }
}
